<!DOCTYPE HTML>
<html>
<head>
    <include file="Public/head" />
<title>计划入库单详情</title>
</head>
<body>
<div class="pd-20">

	<table class="table table-border table-bordered table-bg">

		<tbody>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">订单编号</td>
				<td class="text-l">
					<input type="hidden" class="input-text" value="<{$detail.order_no}>" placeholder="订单编号" id="order_no" name="order_no">
					<input type="text" class="input-text" value="<{$detail.order_no}>" placeholder="订单编号"  disabled="disabled">
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5">申请部门</td>
				<td class="text-l">
					<select  class="input-text" id="section_no" name="section_no">
						<option value="0">请选择</option>
						<volist name="section_list" id="vo">
							<option value="<{$vo.no}>" <if condition="$vo['no'] eq $detail['section_no']">selected</if>><{$vo.name}></option>
						</volist>
					</select>
				</td>						
			</tr>
			<tr class="text-c">
					<td width="15%" class="text-r" style="background-color:#f5f5f5">制单人：</td>
					<td class="text-l">
						<select  class="input-text people_make_no" id="people_make_no" name="people_make_no">
							<option value="0">请选择</option>
							<volist name="personnel_list" id="vo">
								<option value="<{$vo.no}>" <if condition="$vo['no'] eq $detail['people_make_no']">selected</if>><{$vo.name}></option>
							</volist>
						</select>
						
					</td>
					<td width="15%" class="text-r" style="background-color:#f5f5f5">采购申请人：</td>
					<td class="text-l">
						<select  class="input-text people_purchasing_no" id="people_purchasing_no" name="people_purchasing_no">
							<option value="0">请选择</option>
							<volist name="personnel_list" id="vo">
								<option value="<{$vo.no}>" <if condition="$vo['no'] eq $detail['people_purchasing_no']">selected</if>><{$vo.name}></option>
							</volist>
						</select>
					</td>						
			</tr>
		</tbody>
	</table>
	
	<table class="table table-border table-bordered table-hover table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="11">原料列表</th>
			</tr>
			<tr class="text-c">
				<th width="40">ID</th>
				<th width="40">采购单编号</th>
				<th width="40">商品编码</th>
				<th width="40">商品名称</th>
				<th width="40">销售单价</th>
				<th width="40">数量</th>
				<th width="40">规格</th>
				<th width="40">原产国</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c">
			 <input  name='gid' type="hidden" style="width:80px;" value="<{$vo['id']}>"/>
				<td><{$vo.id}></td>
				<td><span><{$detail.order_no}></span></td>
				<td><{$vo.goods_sn}></td>
				<td><{$vo.goods_name}></td>
				<td>
					<{$vo['goods_price']}>
				</td>
				<td>
					<{$vo.goods_nums}>
				</td>
				<td>
					<{$vo.spec}>
				</td>
				<td>
					 <select name="country_code" class="form-control selects" 
						 <volist name="country" id="vcc">
							<if condition="$vcc['country_code'] == $vo['source']">disabled="disabled"  style="width:130px;background:#ccc;"
							</if>
						 </volist>
					 >
                         <option value="">请选择</option>
                         <volist name="country" id="vcc">
                             <option value="<{$vcc.country_code}>" <if condition="$vcc['country_code'] == $vo['source']">selected</if>><{$vcc.country_name}></option>
                         </volist>
                     </select>
				</td>
	
			</tr>
			</volist>
		</tbody>
	</table>
	<span class="select-box" style="width:150px">
				<select class="select" id="examined_two_status" name="selval">
					<option value="0">请选择</option>	
					<option value="1">通过</option>	
					<option value="-1">不通过</option>	
				</select>
	</span>
	<button href="javascript:;" id="examinedset" class="btn btn-primary radius">审核</button>
<div class="pages">
<{$page}>
</div>
</div>
<script type="text/javascript">
    $(function(){
		/*保存计划入库单数据*/
        $("#examinedset").click(function(){
			if($('#examined_two_status').val()==0){
				layer.msg('请选择审核状态');
				return false;
			}
			$.ajax({
                type: 'POST',
                data:{examined_two_status:$('#examined_two_status').val(),id:"<{:I('id')}>",auditor_two:"<{:session('username')}>"},
                url: "<{:U('examinedset_two')}>",
                success:function(data){
                    layer.msg(data.info,function(){
						if(data.status==0){
							return false;
						}
						parent.window.location.href =parent.window.location.href;
					});
                }
            })
            
        });
		



    })
</script>
 <include file="Public/footer" />
<include file="Public/footer_js" />
</body>
</html>